<?php

return array(
    'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
    'name' => '妈咪街 mamijie',
    'defaultController' => 'front/index',
    'language' => 'zh_cn',
    'theme' => 'mmj',    
    'preload' => array('log'),
    //设置别名
    'aliases' => array(
        'theme' => 'webroot.themes.mmj',
        'bootstrap' => 'ext.YiiBooster.src.widgets',
    ),
    // autoloading model and component classes
    'import' => array(
        'application.models.*',
        'application.components.*',
        'application.extensions.SsoClient.*',//关联用户
    ),
    'modules' => array(
        'admin' => array(
            'class' => 'application.modules.admin.AdminModule',
        ),
        'front' => array(
            'class' => 'application.modules.front.FrontModule',
        ),
        'user' => array(
            'class' => 'application.modules.user.UserModule',
        ),
        'cron' => array(
            'class' => 'application.modules.cron.CronModule',
        ),
    ),
    // application components
    'components' => array(
        'user' => array(
            // enable cookie-based authentication
            //'allowAutoLogin' => true,
            'class' => 'UserPassport',
        ),
        'errorHandler' => array(
            // use 'site/error' action to display errors
            'errorAction' => 'front/public/error',
        ),
        'log' => array(
            'class' => 'CLogRouter',
            'routes' => array(
                array(
                    'class' => 'CFileLogRoute',
                    'levels' => 'error, warning',
                ),
            // uncomment the following to show log messages on web pages
            /*
              array(
              'class'=>'CWebLogRoute',
              ),
             */
            ),
        ),
        'cache' => array(
            'class' => 'system.caching.CDummyCache',
        ),
        'urlManager' => array(
            'urlFormat' => 'path',
            'showScriptName' => false, //隐藏index.php   
            'urlSuffix' => '.html', //后缀   
            'rules' => array(
                'k<gid:\d+>' => 'front/good/skip',
                //'http://m.mamijie.com<_q:.*>/*' => 'wap<_q>',
                //'http://appapi.mamijie.com<_q:.*>/*' => 'app<_q>',
                'g<gid:\d+>' => 'front/good/show',
                'cat/<cid:\d+>' => 'front/index/index',
                'index' => 'front/index/index',
                'jd' => 'front/cat/jd',
                'jj' => 'front/cat/jj',
                'cat-menu/<cid:\d+>' => 'front/cat/index',
                'tomorrow' => 'front/cat/tomorrow',
                'ycid/<cid:\d+>' => 'front/cat/yesterday',
                'baoming' => 'user/bm/bm',
                'query' => 'front/bm/lookup',
                'article/<id:\d+>' => 'front/article/show',
                'anquan/<id:\d+>' => 'front/article/anquan',
                'qing' => 'front/index/qing',
                'tmall' => 'front/index/tmall',
                'nohf' => 'front/index/nohf',
                'huodong' => 'front/cat/promotion',
                'sitemap' => 'front/index/sitemap',
                'jifen' => 'front/index/score',
                'shangjia' => 'front/special/index',
                'tag-<tag:\w+>' => 'front/index/tag',
                'tehui' => 'front/index/momdiscount',
                'baike' => 'front/index/articlesList',
                'baike/<id:\d+>' => 'front/index/articlesDetail',
                //'mijihou' => 'front/index/meilishuohou'
            ),
        ),
/*        'clientScript' => array(
            'class' => 'application.extensions.EClientScript.EClientScript',
            'combineScriptFiles' => true, // 默认情况下，它被设置为true，则设置为true，如果你想合并的脚本文件
            'combineCssFiles' => true, // 默认情况下，它被设置为true，则设置为true，如果你想合并CSS文件
            'optimizeScriptFiles' => false, // @since: 1.1
            'optimizeCssFiles' => false, // @since: 1.1
            'optimizeInlineScript' => false, // @since: 1.6, This may case response slower
            'optimizeInlineCss' => false, // @since: 1.6, This may case response slower
        ),*/
    ),


    //一些常用的配置。邮箱
    'params' => array(
        'adminEmail' => '2428552416@qq.com',
        'taoAPI' => array(
            'AppKey' => '21499153',
            'AppSecret' => '56590c6bcb55d8d7d101a4655f8c3493',
        ),
        'sinaAPI' => array(
            'WB_AKEY' => "526570810",
            'WB_SKEY' => "c9d28a326bbfabf038352e7d8582b9b6",
            //'WB_CALLBACK_URL' => "http://cs.1zw.com/user/oauth/sina"
            'WB_CALLBACK_URL' => "http://www.mamijie.com/user/oauth/sina"
        ),        
        'QQAPI' => array(
            'appid' => "101142447",
            'appkey' => "6f13b2dfe294c93b3c632875ba3a37ce",
            'callback' => "http://www.mamijie.com/user/oauth/qq",
            'scope' => "get_user_info,add_t,add_pic_t"
        ),        
        'smtp' => array(
            'Host' => "smtp.qiye.163.com",
            'SMTPAuth' => true,
            'account' => array(
                array('Username' => 'systems001@mamijie.com', 'Password' => 'shpfmmj1zw', 'From' => 'systems001@mamijie.com',),
                array('Username' => 'systems002@mamijie.com', 'Password' => 'shpfmmj1zw', 'From' => 'systems002@mamijie.com',),
                array('Username' => 'systems003@mamijie.com', 'Password' => 'shpfmmj1zw', 'From' => 'systems003@mamijie.com',),
                array('Username' => 'systems004@mamijie.com', 'Password' => 'shpfmmj1zw', 'From' => 'systems004@mamijie.com',),
                array('Username' => 'systems005@mamijie.com', 'Password' => 'shpfmmj1zw', 'From' => 'systems005@mamijie.com',),
                array('Username' => 'systems006@mamijie.com', 'Password' => 'shpfmmj1zw', 'From' => 'systems006@mamijie.com',),
                array('Username' => 'systems007@mamijie.com', 'Password' => 'shpfmmj1zw', 'From' => 'systems007@mamijie.com',),
                array('Username' => 'systems008@mamijie.com', 'Password' => 'shpfmmj1zw', 'From' => 'systems008@mamijie.com',),
                array('Username' => 'systems009@mamijie.com', 'Password' => 'shpfmmj1zw', 'From' => 'systems009@mamijie.com',),
                array('Username' => 'systems010@mamijie.com', 'Password' => 'shpfmmj1zw', 'From' => 'systems010@mamijie.com',),
            ),
        ),  
        //Redis配置
        'RedisConfig' => array(
            'host' => '10.168.82.94',
            //'host' => '127.0.0.1',
            'port' => 6379,
        ),

        //服务费折扣 百分比
        'Discount' => 5,
        //保证金
        'Bond' => 0,
    ),
);
